﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="application-list.aspx.cs"
    Inherits="SmartSpace.WebApp._console.core.application_list" MasterPageFile="~/_console/_console.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMenu" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ContentPlaceHolderTitle" runat="server">
    application list
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderToolbar" runat="server">
    <a href="application-add.aspx">添加</a>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolderContent" runat="server">
    <div class="box">
        <h2>all application list</h2>
        <div class="block">
                <table class="list">
        <asp:Repeater ID="_ctlList" runat="server" DataMember="Id">
            <HeaderTemplate>
                <thead>
                    <tr>
                        <th style="width: 50px;">-
                        </th>
                        <th>
                            HostUrl
                        </th>
                        <th>名称
                        </th>
                        <th>排序号
                        </th>
                        <th>主题
                        </th>
                        <th>modules
                        </th>
                        <th>类型
                        </th>
                        <th>导航
                        </th>
                        <th>操作
                        </th>
                    </tr>
                    </thead>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                       
                        <img src="../resources/images/common/selected.png" visible='<%# IsSelected(Eval("HostUrl")) %>' runat="server" />
                        <img src="../resources/images/common/locked.png" visible='<%# !IsSelected(Eval("HostUrl")) %>' runat="server" />
                    </td>
                    <td>
                        <a>
                            <%# Eval("HostUrl") %>
                        </a>
                    </td>
                    <td>
                        <img src="./image-preview.aspx?id=<%# Eval("ImageId") %>" width="16" height="16" />
                        <%# Eval("Name") %>
                    </td>
                    <td>
                        <%# Eval("SortIndex") %>
                    </td>
                    <td>
                        <a href='<%# Eval("Id","./application-theme-assign.aspx?id={0}") %>' title="click to select other theme">
                            <%# GetThemeName(Eval("ThemeId"))%>
                        </a>
                    </td>
                    <td>
                        <a href='<%# Eval("Id","./application-module-assign.aspx?id={0}") %>' title="click to setting modules">
                            settings
                        </a>
                    </td>
                    <td>
                        <%# Eval("Type") %>
                    </td>
                    <td>
                        <a href='./application-navigation-list.aspx?id=<%# Eval("Id") %>'>设置</a>
                        <a href='./application-navigation-assign.aspx?id=<%# Eval("Id") %>'>分配</a>
                    </td>
                    <td>
                        <a href='./application-edit.aspx?id=<%# Eval("Id") %>'>修改</a>
                        <asp:LinkButton ID="_ctlCmdDelete" runat="server" OnClick="_ctlCmdDelete_Click" CommandArgument='<%# Eval("Id") %>' OnClientClick='<%# Eval("Name","return confirm(\"do you want delete application [{0}]\");")%>'>delete</asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:Repeater>
                </table>
                    </div>
    </div>
</asp:Content>
